using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Initializer : SingleMonoScene<Initializer>
{
    public bool isEditorMode = false;
    public bool isUIManagerDebugMode = false;
    public bool isSoundManagerDebugMode = false;
    public bool isObjectPoolDebugMode = false;

    [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
    static void OnBeforeSceneLoad()
    {
        //Debug.Log("游戏启动时初始化 - 在任何场景加载前");
    }
    void Awake()
    {
        InitModeEditor();
    }

    void InitModeEditor()
    {
        Debug.Log("InitModeEditor");
        UIManager.Instance.isEditorMode = isEditorMode;
        SoundManager.Instance.isEditorMode = isEditorMode;
        ObjectPoolManager.Instance.isEditorMode = isEditorMode;
        SoundManager.Instance.Init();
    }

    void InitDebug()
    {
        UIManager.Instance.isDebug = isUIManagerDebugMode;
        SoundManager.Instance.isDebug = isSoundManagerDebugMode;
        ObjectPoolManager.Instance.isDebug = isObjectPoolDebugMode;
        
    }
}
